echo '当前工作路径为：'$1

# 存储当前路径
current_path=$1
# 拉取代码
git pull
echo '代码同步完成'
# 进入到hspaynew子目录
cd $current_path/hspaynew
# 安装依赖
mvn clean 
mvn package -P prod
echo '依赖安装完成'
# 发送钉钉消息进行通知
curl https://oapi.dingtalk.com/robot/send?access_token=205edb567bc359d816b648aea7c7fc1b58ce6f929a0ab9efdc51934e4aace941 -H 'Content-Type: application/json' -X POST -d '{"msgtype":"markdown","markdown":{"title":"项目编译完成","text":"**项目编译完成**\n\n>  提交人员: **<font color=green>小欣</font>**\n\n>"}}'

# 项目部署目录
ROOT_DIR="/home/hspay/service"

cd $ROOT_DIR

./app.sh restart xxpay-agent